<template>
	<div class="navMenu">
		<el-menu :default-active="$route.name" :router="true" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b" class="el-menu-vertical-demo"
		 @open="handleOpen" @close="handleClose" :collapse="isCollapse" style="border-right:none">
			<el-menu-item index="sealList">
				<i class="el-icon-menu"></i>
				<span slot="title">印章列表</span>
			</el-menu-item>
			<el-menu-item index="maintainList">
				<i class="el-icon-menu"></i>
				<span slot="title">维护列表</span>
			</el-menu-item>
			<el-menu-item index="aplicationCenter">
				<i class="el-icon-document"></i>
				<span slot="title">应用中心</span>
			</el-menu-item>
			<!-- <el-menu-item index="systemSettings">
				<i class="el-icon-document"></i>
				<span slot="title">系统设置</span>
			</el-menu-item> -->
			<div v-if="userInfo.loginName=='admin'">
				<el-menu-item index="updateLog">
					<i class="el-icon-upload"></i>
					<span slot="title">更新日志</span>
				</el-menu-item>
				<el-menu-item index="sysLog" >
					<i class="el-icon-upload"></i>
					<span slot="title">系统日志</span>
				</el-menu-item>
			</div>
			
		</el-menu>
	</div>
</template>

<script>
	let that = ''
	import {
		mapActions,
		mapGetters
	} from 'vuex';
	export default {
		computed: {
			...mapGetters(['userInfo', 'api']) //获取
		},
		props: {
			isCollapse: {
				type: Boolean,
				default: false
			},
		},
		data() {
			return {}
		},
		mounted() {

		},
		methods: {
			handleOpen(key, keyPath) {
				console.log(key, keyPath);
			},
			handleClose(key, keyPath) {
				console.log(key, keyPath);
			}
		}
	}
</script>

<style scoped="scoped" lang="scss">
	.el-menu-vertical-demo:not(.el-menu--collapse) {
		width: 200px;
		height: 100vh;
		overflow-y: auto;
		min-height: 400px;
	}
	.el-menu--collapse{
		height: 100vh;
	}
</style>
